﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace ERP_RORZE_TOOL.Tool.UserControls
{
    public partial class uc_Main : DevExpress.XtraEditors.XtraUserControl
    {
        public uc_Main()
        {
            InitializeComponent();
        }

        private void navMaker_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucMaker = new ucMaker();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucMaker);
            ucMaker.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navSupplier_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucSupplier = new ucSupplier();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucSupplier);
            ucSupplier.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navRate_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {

        }

        private void navToolGroup_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucToolGroup = new ucToolGroup();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucToolGroup);
            ucToolGroup.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navTool_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucTool = new ucTool();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucTool);
            ucTool.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }


        private void navFrequency_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucFrequency = new ucFrequency();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucFrequency);
            ucFrequency.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navMistake_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucMistake = new ucMistake();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucMistake);
            ucMistake.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navRotate_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucRotate = new ucRotate();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucRotate);
            ucRotate.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navProcessStatus_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucPStatus = new ucProcessStatus();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucPStatus);
            ucPStatus.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navToolStatus_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucTStatus = new ucToolStatus();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucTStatus);
            ucTStatus.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navKind_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucKind = new ucKind();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucKind);
            ucKind.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navImport_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucImport = new ucImport();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucImport);
            ucImport.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navJustNew_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucJustNew = new ucJustNew();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucJustNew);
            ucJustNew.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBorrow_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucBorrow = new ucBorrow();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucBorrow);
            ucBorrow.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBroken_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucBroken = new ucBroken();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucBroken);
            ucBroken.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navReturn_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            var ucReturn = new ucReturn();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(ucReturn);
            ucReturn.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

         private void navBarReports_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ucReportsList rp = new ucReportsList();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(rp);
            rp.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }

        private void navBarNewReport_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ucReports rp = new ucReports();
            panelControlLeft.Controls.Clear();
            panelControlLeft.Controls.Add(rp);
            rp.Dock = DockStyle.Fill;
            Cursor.Current = Cursors.Default;
        }
    }
}
